Two VBScript programs to send a message to all members of a group. The programs requires two command line parameters. The first is the either the NetBIOS name of the group or the Distinguished Name of the group. The second parameter is the text message to be sent to members of the group that are users. The message should be enclosed in quotes. A third optional parameter indicates if the program will wait for each message to be sent before continuing. If the third parameter is True, this allows the program to count how many users were successfully sent the message. The default is False, which means the program cannot tell how many users were sent the message. Both programs send the message to all users that are members of the group, either directly, or due to group nesting.

The first program uses the "net send" command, which is no longer available in Windows Vista and later operating systems. In addition, the "net send" command uses the Windows messenger service. Windows XP SP1 and Windows Server 2003 SP1 disable the messenger service by default. For this program to work, the messenger service must be enabled.

SendMessageToGroup.txt <<-- Click here to view or download the program

The second program uses the "msg" command. This command is available on Windows XP and above, Windows Server 2003 and above, and Windows 2000 Server. It is not available on Windows 2000 or older operating systems. Also, it does not require the messenger service.

SendMessageToGroup2.txt <<-- Click here to view or download the program